clear all
program drop _all
set more off
set mem 600m

cd "C:\Users\master\Dropbox\Research\mexican_repatriates2\data\kwan"
use "D:\raw\1910.dta"

keep if age>=18 & age<=65

keep statefip county gq labforce classwkr school bpl bpld fbpl mbpl empstat perwt empstatd classwkrd

drop if empstatd==13
drop if classwkrd==29
drop if school==2

keep if bpld<15000 | bpld==90011 | bpld==90021 | bpld==90022
drop if bpl==200 | fbpl==200 | mbpl==200

replace county = (1000*statefip) + (county/10)

gen emp=0
replace emp=1 if empstat==1

collapse (sum) emp10_native=emp, by(county)

save native_emp1910.dta, replace 
